<template>
  <div class="Annex_detail" v-if="dialogVisible">
    <el-dialog
      title="附件详情"
      :visible.sync="dialogVisible"
      v-dialogDrag
      :close-on-click-modal="false"
      customClass="mes_dialog"
      @closed="clearData">
      <div class="table_container">
        <el-table
          :data="DetailList"
          ref="tableDialogNode"
          border
          class="table_dialog">
          <el-table-column
            :class-name="'static_col'"
            prop="fileName"
            label="附件名称"
            :resizable="false"
            show-overflow-tooltip
            align="left">
          </el-table-column>
          <el-table-column
            label="操作"
            :resizable="false"
            show-overflow-tooltip
            align="center"
            fixed="right"
            width="120">
            <template slot-scope="scope">
          <span class="jump_item"
                @click.stop="$downByBlob(scope.row.uploadHistoryId, scope.row.fileName)">下载</span>
              <!--<span class="jump_item"-->
              <!--v-if="$checkPreviewName(scope.row.fileName)&&$checkPreviewSize(scope.row.fileSize)"-->
              <!--@click.stop="$previewFile(scope.row.uploadHistoryId)">预览</span>-->
              <!--<span class="jump_item is_disabled" v-else>预览</span>-->
            </template>
          </el-table-column>
        </el-table>
      </div>
      <span slot="footer" class="mes_btn">
        <el-button @click="dialogVisible = false">取 消</el-button>
      </span>
    </el-dialog>
  </div>
</template>

<script>
export default {
  name: 'AnnexDetail',
  data() {
    return {
      dialogVisible: false, // 是否显示
      isLoading: false, // 加载中
      DetailList: [], // 列表数据
      fileName: ''
    }
  },
  methods: {
    openDialog(obj) {
      this.init()
      this.dialogVisible = true
    },
    // 初始化
    init() {
      this.isLoading = true
      // let postData = {
      //   url: 'a/workstageproblemprocesshistory/workstageProblemProcessHistory/list ',
      //   method: 'post',
      //   data: {
      //     pageNo: 1,
      //     pageSize: 999,
      //     query: {},
      //   },
      //   noCommit: true
      // }
      // this.$store.dispatch('saveData', postData).then(res => {
      //   this.DetailList = res.data.list
      // }).finally(() => {
      //   this.isLoading = false
      // })
    },
    // 关闭弹窗清除数据
    clearData() {
      this.DetailList = []
    }
  }
}
</script>

<style lang="less">
  .Annex_detail {

  }

</style>
